
<header class="navbar navbar-default navbar-fixed-top" role="navigation" style="background-color: ghostwhite">
 <div class="navbar-header">
	<span style="padding-top: 0" class="navbar-brand"><%= image_tag "3.png" %></span>
 </div>
 <div >
	 <ul class="nav navbar-nav " >
		 <li class="<%= current_page?(home_index_path)? 'active': '' %>"><%=link_to 'Home',home_index_path %></li>
		 <li class="<%= current_page?(topics_path)? 'active': '' %>"> <%=link_to "社区",topics_path %> </li>
		 <li class="<%= current_page?(jobs_path)? 'active': '' %>"> <%=link_to "精彩分享",jobs_path %> </li>
		 <li class="<%= current_page?(sites_path)? 'active': '' %>"> <%=link_to "酷站",sites_path %> </li>

	 </ul>
 </div>
	<div class=" pull-right">
		<ul class="nav navbar-nav">
			<li class="nav-search">
			 	<form class="navbar-form form-search active" action="/search" method="get">
					<div class=" form-group ">
						<input class="form-control" name="q" type="text" value="<%= params[:q]%>" placeholder="搜索本站内容" />
					</div>
					<i class="fa fa-search btn-search " ></i>
				</form>
			</li>
			<%if can? :create ,Role%>
				<li class="">
					<%= link_to "用户权限管理",search_roles_path%>
				</li>
			<%end%>
			<li class="divider-vertical "></li>
			<li class="notification_count">
				<a href="<%= notifications_path%>" class="" title="通知">
					<i class="fa fa-bell" style="<%= count_unread_notification>0 ? "color: orangered" : "" %>" ></i>
					<span class="count"><%=count_unread_notification%></span>
				</a>
			</li>
			<%if current_user %>
			 	<li class="dropdown pull-right ">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=current_user.name %><b class="caret bottom-up"></b></a>
					<ul class="dropdown-menu dropdown-menu-right">
					 <li><%= link_to '个人', user_path(current_user) %></li>
				 	<li><%=link_to '个人资料设置',edit_user_registration_path%></设置></li>
				 	<li class="divider"></li>
					<li ><a href="/sidekiq">Sidekiq</a></li>
				 	<li><%= link_to '退出',destroy_user_session_path,method: :delete%></li>
					</ul>
			 	</li>
		 	<%else%>
					<li><%=link_to '注册',new_user_registration_path %> </li>
			 		<li> <%=link_to'登陆',new_user_session_path %></li>
		 	<%end%>
	</ul>
 </div>
</header>
